//
//  AccountModel.h
//  GuiderHealth
//
//  Created by zyming on 2020/9/1.
//  Copyright © 2020 YM&EF. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@class DeviceModel;
@interface AccountModel : NSObject

///设置deviceType
+ (void)setMainDeviceType:(NSString *)deviceType;
///获取deviceType
+ (NSString *)getMainDeviceType;

///MainColor
+ (UIColor *)GetMainColor;

+ (BOOL)GetMainTypeOrange;

#pragma mark - 当前地址
+ (NSString *)GetBaseURL;
+ (void )SetBaseURL:(NSString *)baseURL;

#pragma mark - 当前账户信息
//当模型有新字段时调用更新
+ (void)AlterTableAccount;
///获取账户信息
+ (AccountModel *)getAccountInfo;
///储存账户信息
+ (void)saveAccountInfo:(AccountModel *)account;

#pragma mark - 当前选择的账户信息
/// 获取当前选择账户的信息
+ (AccountModel *)getSelectAccountInfo;
/// 存储当前选择账户信息
+ (void)saveSelectAccountInfo:(AccountModel *)account;
///当前选择账户id
+ (NSString *)getSelectedAccountId;

#pragma mark - 通用
///清空用户信息
+ (void)clearAccountInfo;

///目标步数
@property (nonatomic, copy) NSString *targetSteps;
///refreshToken
@property (nonatomic, copy) NSString *refreshToken;
///账户Id
@property (nonatomic, assign) NSString *accountId;
///imID
@property (nonatomic, assign) NSString *im_accountId;
///expired
@property (nonatomic, assign) NSString *expired;
/// token
@property (nonatomic, copy) NSString *token;
///user_id;
@property (nonatomic, copy) NSString *user_id;
///userGroupId;
@property (nonatomic, assign) NSString *userGroupId;
///区号
@property (nonatomic, copy) NSString *telAreaCode;
@property (nonatomic, copy) NSString *areaCode; //用于 完善资料界面
///手机号
@property (nonatomic, copy) NSString *phone;
///邮箱
@property (nonatomic, copy) NSString *email;
///密码+md5
@property (nonatomic, copy) NSString *passWord_md5;
@property (nonatomic, copy) NSString *passWord;
///头像
@property (nonatomic, copy) NSString *headUrl;
///姓名
@property (nonatomic, copy) NSString *name;
///性别
@property (nonatomic, copy) NSString *gender;
///生日
@property (nonatomic, copy) NSString *birthday;
///体重
@property (nonatomic, copy) NSString *weight;
///身高
@property (nonatomic, copy) NSString *height;
///昵称
@property (nonatomic, copy) NSString *relationShip;
///国家
@property (nonatomic, copy) NSString *nation;
///省
@property (nonatomic, copy) NSString *province;
///城市
@property (nonatomic, copy) NSString *city;
///electricity
@property (nonatomic, copy) NSString *electricity;
///OFFLINE
@property (nonatomic, copy) NSString *deviceState;
@property (nonatomic, copy) NSString *emergencyContact;
@property (nonatomic, copy) NSString *emergencyContactPhone;
@property (nonatomic, copy) NSString *cardId;
@property (nonatomic, copy) NSString *updateTime;
@property (nonatomic, copy) NSString *mail;
@property (nonatomic, copy) NSString *descDetail;
@property (nonatomic, copy) NSString *userState;
@property (nonatomic, copy) NSString *userType;
@property (nonatomic, copy) NSString *homePhone;
@property (nonatomic, copy) NSString *healthStatus;
@property (nonatomic, copy) NSString *countie;
@property (nonatomic, copy) NSString *healthType;
@property (nonatomic, copy) NSString *createTime;
@property (nonatomic, copy) NSString *addr;
@property (nonatomic, copy) NSString *remark;
@property (nonatomic, copy) NSString *rssi;
///COMMON FINDER
@property (nonatomic, copy) NSString *deviceMode;
@property (nonatomic, copy) NSString *deviceType;
@property (nonatomic, copy) NSString *deviceTypeName;
@property (nonatomic, copy) NSString *deviceCode;

///画线描点类型 L:画线 P:描点 LP:画线且描点
@property (nonatomic, copy) NSString *pointShowType;
///是否展示时间弹窗
@property (nonatomic, assign) BOOL timeWinShow;
///铃声模式 单次:SINGLE_PLAY 循环:LOOP_PLAY 关闭:CLOSE_PLAY
@property (nonatomic, copy) NSString *warnType;
///铃声开关
@property (nonatomic, assign) BOOL openSos;
@property (nonatomic, copy) NSString *testString234;

/////寻人模式是否开启 0:关闭 1:开启
//@property (nonatomic, copy) NSString *deviceMode;

@property (nonatomic, copy) NSArray <DeviceModel *>*deviceList;

@end

@interface DeviceModel : NSObject
///存储设备信息
+ (void)saveDeviceInfo:(DeviceModel *)device;
///获取设备信息
+ (DeviceModel *)getDeviceInfo;

+ (NSString *)getSelectDeviceType;
+ (NSString *)getSelectDeviceCode;


@property (nonatomic, copy) NSString *deviceCode;
@property (nonatomic, assign) NSInteger accountId;
@property (nonatomic, copy) NSString *deviceTypeName;
@property (nonatomic, copy) NSString *deviceType;
@property (nonatomic, assign) NSInteger rssi;
@property (nonatomic, assign) NSInteger electricity;
@property (nonatomic, copy) NSString *deviceState;
@property (nonatomic, copy) NSString *deviceMode;

@end

NS_ASSUME_NONNULL_END
